<template>
    <div class="songhead" >
        <!-- 背景滤镜 -->
        <img :src="songHeadData.coverImgUrl" alt="" class="backfill">

        <!-- 头部导航部分 -->
        <div class="tithead">
            <div>
                <i class="iconfont icon-xitongfanhui" @click="goback"></i>
                <span>歌单</span>
            </div>
            <div>
                <i class="iconfont icon-sousuo" ></i>
                <i class="iconfont icon-gengduo-shuxiang" style="font-size:.25rem"></i>
            </div>
        </div>
        
        <!-- 图片和icon部分 -->
        <div class="iconimg">
            <div class="numpos">
                <img :src="songHeadData.coverImgUrl" alt="">
                <span>{{ songHeadData.playCount}}</span>
            </div>
            <div class="maintext">
                <div class="detailname">{{songHeadData.name}}</div>
                <div class="creatinfo">
                    <img v-if="songHeadData.creator" :src="songHeadData.creator.avatarUrl" alt="" class="touxiang">
                    <span v-if="songHeadData.creator" class="creatname">{{ songHeadData.creator.nickname }}</span>
                    <i class="iconfont icon-jiahao creatpay"></i>
                </div>
                <div class="introduc">
                    <span class="intr">{{songHeadData.description}}</span>
                    <span><i class="iconfont icon-xiangyoujiantou"></i></span>
                </div>
            </div>
            <div class="tabcut">
                <i class="iconfont icon-xialajiantouxiao"></i>
            </div>
        </div>

        <!-- 操作收藏评论和分享部分 -->
        <div class="score">
            <div>
                <i class="iconfont icon-shoucang"></i>
                <span>{{songHeadData.trackCount}}</span>
            </div>
            <div class="comment">
                <i class="iconfont icon-jianyi"></i>
                <span>{{songHeadData.commentCount}}</span>
            </div>
            <div>
                <i class="iconfont icon-fenxiang"></i>
                <span>{{songHeadData.shareCount}}</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name:'songhead',
    props:['songHeadData'],
    methods: {
        goback(){
            this.$router.go(-1)
        }
    }
};
</script>

<style scoped lang="scss">
.songhead{
    color: #fff;
    padding: .2rem;
    // background-image: linear-gradient(to bottom right, #3C7F4C, #734945);
    border-bottom-left-radius: .2rem ;
    border-bottom-right-radius: .2rem ;
    position: relative;
    margin-bottom: .4rem;
    // 背景图得滤镜模式
    .backfill{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: -1;
        filter: blur(40px);
    }
    .tithead{
        display: flex;
        justify-content: space-between;
        div{
            width: 20%;
            display: flex;
            justify-content: space-between;
            .iconfont{
                font-size: .2rem;
            }
        }
    }
    .iconimg{
        display: flex;
        margin: .2rem 0rem;
        position: relative;
        .numpos{
            position: relative;
            span{
                padding: 0.03rem .1rem;
                background-color: rgba(1,1 ,1 , .3);
                border-radius: 30%;
                position: absolute;
                top: .05rem;
                right: .1rem;
                color: #fff;
                font-size: .12rem;
            }
        }
        .maintext{
            margin-left: .15rem;
            .detailname{
                line-height: .3rem;
                padding-right: .3rem;
            }
            .creatinfo{
                display: flex;
                align-items: center;
                margin: .1rem 0rem;
                .touxiang{
                    width: .2rem;
                    border-radius: 50%;
                }
                .creatname{
                    font-size: .12rem;
                    margin: 0rem .03rem;
                    color: #7E7F6F;
                }
                .creatpay{
                    background-color: #7D806F;
                    border-radius: .1rem;
                    padding: .01rem .06rem;
                }
            }
            .introduc{
                display: flex;
                justify-content: space-between;
                .intr{
                    display: inline-block;
                    font-size: .12rem;
                    color: #7E7F6F;
                    width: 1.8rem;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }
            

        }
        .tabcut{
            position: absolute;
            top: 0.02rem;
            right: 0rem;
        }
        img{
            width: 1rem;
            border-radius: .2rem;
        }
    }
    .score{
        display: flex;
        align-items: center;
        padding: .1rem .2rem ;
        background-color: #fff;
        position: absolute;
        left: 50%;
        // bottom: ;
        transform: translateX(-50%);
        border-radius: .3rem;
        color: #000;
        box-shadow: 0px 2px 2px 2px #F9F9F9;
        div{
            padding: 0rem .18rem;
            display: flex;
            align-content: center;
            .iconfont{
                margin: 0rem .05rem;
                font-size: .2rem;
            }
            span{
                font-size: .15rem;
            }
        }
        .comment{
            border-left: 1px solid #eee;
            border-right: 1px solid #eee;

        }
    }
}
</style>
